const url = require('url');
module.exports = {
  get path() {
    // 屬性訪問器, this指向 ctx.request,ctx.request上面有原生的req
    let { pathname } = url.parse(this.req.url, true);
    return pathname;
  },
  get query() {
    let { query } = url.parse(this.req.url, true);
    return query;
  },
};
